<?
	if($_SESSION['login'] == true){
		if($_SESSION['user']['level_name'] == "admin"){
			redirect("admin.php");
		}elseif($_SESSION['user']['level_name'] == "board"){
			redirect("sar.php?id=1");
		}elseif($_SESSION['user']['level_name'] == "officer"){
			redirect("sar.php?id=1");
		}elseif($_SESSION['user']['level_name'] == "assessor"){
			redirect("sar.php?id=1");
		}
	}elseif( isset($_SESSION['error']) ){
		alert($_SESSION['error']);
		$tpl->draw("login-form");

	}else{
		$tpl->draw("login-form");
	}
?>